n=int(input())
s=0
flag=1
for i in range(1,n+1):
    s+=flag*(i/(2*i-1))
    flag=-flag
print("{:.3f}".format(s))